assume cs:code,ds:data
data segment
    string1 DB 'helloworld','$'
    string2 DB 20 dup(?)
data ends
code segment
start:
    mov ax,data
    mov ds,ax
    mov dx,offset string1
    mov ax,offset string2
    mov ch,0
while:
    mov bx,dx
    mov cl,[bx]
    mov bx,ax
    mov [bx],cl
    add dx,1
    add ax,1
    cmp cl,'$'
    
    jnz while
    mov bx,ax
    mov [bx],cl 
    mov dx,offset string2
    mov ah,9
    int 21H
    mov ah,4CH
    int 21H
    
code ends
end start
end
